package cn.ywsj.ywsjmidtier.service;

import cn.ywsj.ywsjmidtier.common.Connect;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletResponse;

@FeignClient(url = Connect.XSX_URL,name = "xsx")
public interface WechatSubstituteFeign {

    @GetMapping(value = {" /wechat/member/substitutesalemgr/tosubstitutelist"})
      String substituteList();

    @GetMapping(value = {" /wechat/member/substitutesalemgr/selectsubstitutelist"})
      String substituteList(@RequestParam("custId") Long custId);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/ajaxsubstitutelist"})
      String querySubstituteList(@RequestParam("start")Integer start,@RequestParam("pageSize")Integer pageSize);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/ajaxsetsubstitute"})
      String ajaxSetSubstitute(@RequestParam("jsonObject")JSONObject jsonObject);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/toapplysubstituteproduct"})
      String applySubstituteList(@RequestParam("start")Integer start,@RequestParam("pageSize")Integer pageSize);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/ajaxaddsubstituteproduct"})
      String ajaxaddSubstitute(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("result")BindingResult result);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/ajaxsubstituteproductlist"})
      String substituteProductList(@RequestParam("start")Integer start,@RequestParam("pageSize")Integer pageSize);

    @RequestMapping({" /wechat/member/substitutesalemgr/detailproduct"})
      String detailProduct(@RequestParam("jsonObject")JSONObject jsonObject);

    @RequestMapping({" /wechat/member/substitutesalemgr/salecompanydetail"})
      String companySaleDetail(@RequestParam("custId")Long custId, @RequestParam("response")HttpServletResponse response);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/ajaxauditsubstituteproduct"})
      String ajaxAuditSubstitute(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("result")BindingResult result);

    @RequestMapping({" /wechat/member/substitutesalemgr/substituteproductdetail"})
      String substituteProductDetail(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("model") Model model);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/myapplytotal"})
      String myApplytotal(@RequestParam("jsonObject")JSONObject jsonObject);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/mysaletotal"})
      String mySaletotal(@RequestParam("jsonObject")JSONObject jsonObject);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/startsaletotal"})
      String startSaletotal(@RequestParam("jsonObject")JSONObject jsonObject);

    @PostMapping(value = {" /wechat/member/substitutesalemgr/receivesaletotal"})
      String receiveSaletotal(@RequestParam("jsonObject")JSONObject jsonObject);
}
